package com.zhouyang.bootssh.service.impl;


import com.zhouyang.bootssh.dao.UserMapper;
import com.zhouyang.bootssh.entity.books.User;
import com.zhouyang.bootssh.entity.books.UserExample;
import com.zhouyang.bootssh.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther: 周洋
 * @Date: 2018/11/6 16:19
 * @Description:
 */
@Service
public class UserServiceImpl  implements UserService{

    @Autowired
    private UserMapper userMapper;

    @Override
    public int insert(User record) {
        //指定一个uid
//        record.setUid(UUID.randomUUID().toString());
//        System.out.println(record.getUid());
        return userMapper.insert(record);
    }

    @Override
    public List<User> selectByExample(UserExample example) {
        return userMapper.selectByExample(example);
    }
}
